package org.cuadroanotacionapi.persistencia;

import org.cuadroanotacionapi.beans.Jos_fastball_player;
import java.sql.Date; 
import java.sql.Time;
import org.cuadroanotacionapi.beans.*;
import org.cuadroanotacionapi.controller.*;
import java.io.Serializable;
import java.util.List;
import java.util.ArrayList;
import java.util.*;
import java.sql.Connection;
import java.sql.Statement;
import java.sql.ResultSet;
import java.sql.PreparedStatement;
import java.util.Map;
import java.util.Iterator;
import java.util.HashMap;
import java.util.Map;
 import javax.sql.DataSource;
import org.cuadroanotacionapi.generales.Mensajeria;
import org.cuadroanotacionapi.generales.Sesion;


/**
*
* @author
*/

public class Jos_fastball_playerPersistencia implements Serializable {
private static final long serialVersionUID = 1L;
public static Exception excepcion;
public static boolean esMensaje = false;
public static Connection con = null;

public Jos_fastball_playerPersistencia(){
         esMensaje =false;
}


/**
*
* Insertar()
*/

public static boolean Insertar (Jos_fastball_player jos_fastball_player ) {
  excepcion = null;
  try {
      esMensaje =false;
   
   
   
     if (!Conectar()) {
         return false;
      }
      PreparedStatement pinsert = null;
      String sql = "insert into jos_fastball_player(id,active,playerid,teamid,fname,mname,lname,position1,position2,position3,jerseyhome,jerseyaway,bats,tirar,birthdate,heightfeet,heightinches,weight,weightuom,hometown,photo,cphone,cmobile,email,experience,checked_out,checked_out_time,published,player_custom_field1_value,player_custom_field2_value)  values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
      pinsert = con.prepareStatement(sql);
              pinsert.setInt(1,jos_fastball_player.getId());
        pinsert.setInt(2,jos_fastball_player.getActive());
        pinsert.setInt(3,jos_fastball_player.getPlayerid());
        pinsert.setInt(4,jos_fastball_player.getTeamid());
        pinsert.setString(5,jos_fastball_player.getFname());
        pinsert.setString(6,jos_fastball_player.getMname());
        pinsert.setString(7,jos_fastball_player.getLname());
        pinsert.setString(8,jos_fastball_player.getPosition1());
        pinsert.setString(9,jos_fastball_player.getPosition2());
        pinsert.setString(10,jos_fastball_player.getPosition3());
        pinsert.setString(11,jos_fastball_player.getJerseyhome());
        pinsert.setString(12,jos_fastball_player.getJerseyaway());
        pinsert.setString(13,jos_fastball_player.getBats());
        pinsert.setString(14,jos_fastball_player.getTirar());
        pinsert.setDate(15,jos_fastball_player.getBirthdate());
        pinsert.setInt(16,jos_fastball_player.getHeightfeet());
        pinsert.setInt(17,jos_fastball_player.getHeightinches());
        pinsert.setInt(18,jos_fastball_player.getWeight());
        pinsert.setString(19,jos_fastball_player.getWeightuom());
        pinsert.setString(20,jos_fastball_player.getHometown());
        pinsert.setString(21,jos_fastball_player.getPhoto());
        pinsert.setString(22,jos_fastball_player.getCphone());
        pinsert.setString(23,jos_fastball_player.getCmobile());
        pinsert.setString(24,jos_fastball_player.getEmail());
        pinsert.setString(25,jos_fastball_player.getExperience());
        pinsert.setBoolean(26,jos_fastball_player.getChecked_out());
        pinsert.setTime(27,jos_fastball_player.getChecked_out_time());
        pinsert.setBoolean(28,jos_fastball_player.getPublished());
        pinsert.setString(29,jos_fastball_player.getPlayer_custom_field1_value());
        pinsert.setString(30,jos_fastball_player.getPlayer_custom_field2_value());
      int filas= pinsert.executeUpdate();
      pinsert.close();
      con.close();
      return true;
   } catch (Exception e) {
      excepcion = e;
   } finally {
  }
  return false;
 }


/**
*
* Editar()
*/

public static boolean Editar(Jos_fastball_player jos_fastball_player ) {
  excepcion = null;
  try {
      esMensaje =false;
     if (!Conectar()) {
         return false;
      }
      PreparedStatement pupdate = null;
      String sql = "update jos_fastball_player set  id=?, active=?, playerid=?, teamid=?, fname=?, mname=?, lname=?, position1=?, position2=?, position3=?, jerseyhome=?, jerseyaway=?, bats=?, tirar=?, birthdate=?, heightfeet=?, heightinches=?, weight=?, weightuom=?, hometown=?, photo=?, cphone=?, cmobile=?, email=?, experience=?, checked_out=?, checked_out_time=?, published=?, player_custom_field1_value=?, player_custom_field2_value=?  where  id ='"+jos_fastball_player.getId()+"'  ";
      pupdate= con.prepareStatement(sql);
      pupdate.setInt(1,jos_fastball_player.getId());
pupdate.setInt(2,jos_fastball_player.getActive());
pupdate.setInt(3,jos_fastball_player.getPlayerid());
pupdate.setInt(4,jos_fastball_player.getTeamid());
pupdate.setString(5,jos_fastball_player.getFname());
pupdate.setString(6,jos_fastball_player.getMname());
pupdate.setString(7,jos_fastball_player.getLname());
pupdate.setString(8,jos_fastball_player.getPosition1());
pupdate.setString(9,jos_fastball_player.getPosition2());
pupdate.setString(10,jos_fastball_player.getPosition3());
pupdate.setString(11,jos_fastball_player.getJerseyhome());
pupdate.setString(12,jos_fastball_player.getJerseyaway());
pupdate.setString(13,jos_fastball_player.getBats());
pupdate.setString(14,jos_fastball_player.getTirar());
pupdate.setDate(15,jos_fastball_player.getBirthdate());
pupdate.setInt(16,jos_fastball_player.getHeightfeet());
pupdate.setInt(17,jos_fastball_player.getHeightinches());
pupdate.setInt(18,jos_fastball_player.getWeight());
pupdate.setString(19,jos_fastball_player.getWeightuom());
pupdate.setString(20,jos_fastball_player.getHometown());
pupdate.setString(21,jos_fastball_player.getPhoto());
pupdate.setString(22,jos_fastball_player.getCphone());
pupdate.setString(23,jos_fastball_player.getCmobile());
pupdate.setString(24,jos_fastball_player.getEmail());
pupdate.setString(25,jos_fastball_player.getExperience());
pupdate.setBoolean(26,jos_fastball_player.getChecked_out());
pupdate.setTime(27,jos_fastball_player.getChecked_out_time());
pupdate.setBoolean(28,jos_fastball_player.getPublished());
pupdate.setString(29,jos_fastball_player.getPlayer_custom_field1_value());
pupdate.setString(30,jos_fastball_player.getPlayer_custom_field2_value());
      int filas= pupdate.executeUpdate();
      pupdate.close();
      con.close();
      if (filas <= 0){
          excepcion = new Exception("No se pudo actualizar");
          esMensaje =true;
          return false;
      }
      return true;
   } catch (Exception e) {
      excepcion = e;
   } finally {
  }
  return false;
}


/**
*
* Editar()
*/

public static boolean Editar(String sqlupdate ) {
  excepcion = null;
  try {
      esMensaje =false;
     if (!Conectar()) {
         return false;
      }
      PreparedStatement pupdate = null;
      String sql = "update  jos_fastball_player set " + sqlupdate +"";
      pupdate= con.prepareStatement(sql);
      int filas= pupdate.executeUpdate();
      pupdate.close();
      con.close();
      if (filas <= 0){
          excepcion = new Exception("No se pudo editar");
           esMensaje =true;
          return false;
      }
      return true;
   } catch (Exception e) {
      excepcion = e;
   } finally {
  }
  return false;
}


/**
*
* EditarClavePrimaria()
*/

public static boolean EditarClavePrimaria(Jos_fastball_player jos_fastball_player_old , Jos_fastball_player jos_fastball_player) {
  excepcion = null;
  try {
      esMensaje =false;
     if (!Conectar()) {
         return false;
      }
      PreparedStatement pupdate = null;
      String sql = "update jos_fastball_player set  id=?  where  id ='"+jos_fastball_player_old.getId()+"'  ";
      pupdate= con.prepareStatement(sql);
      pupdate.setInt(1,jos_fastball_player.getId());
      int filas= pupdate.executeUpdate();
      pupdate.close();
      con.close();
      if (filas <= 0){
          excepcion = new Exception("No se pudo actualizar");
          esMensaje =true;
          return false;
      }
      return true;
   } catch (Exception e) {
      excepcion = e;
   } finally {
  }
  return false;
}


/**
*
* Eliminar()
*/

public static boolean Eliminar(Jos_fastball_player jos_fastball_player ) {
  excepcion = null;
  try {
      esMensaje =false;
     if (!Conectar()) {
         return false;
      }
      PreparedStatement pdelete = null;
      String sql = "delete from jos_fastball_player  where  id = ?  ";
      pdelete= con.prepareStatement(sql);
      pdelete.setInt(1,jos_fastball_player.getId());
      int filas= pdelete.executeUpdate();
      pdelete.close();
      con.close();
      if (filas <= 0){
          excepcion = new Exception("No se pudo eliminar");
           esMensaje =true;
          return false;
      }
      return true;
   } catch (Exception e) {
      excepcion = e;
   } finally {
  }
  return false;
}


/**
*
* EliminarSQL()
*/

public static boolean Eliminar(String sqldelete ) {
  excepcion = null;
  try {
      esMensaje =false;
     if (!Conectar()) {
         return false;
      }
      PreparedStatement pdelete = null;
      String sql = "delete from jos_fastball_player where " + sqldelete +"";
      pdelete= con.prepareStatement(sql);
      int filas= pdelete.executeUpdate();
      pdelete.close();
      con.close();
      if (filas <= 0){
          excepcion = new Exception("No se pudo eliminar");
           esMensaje =true;
          return false;
      }
      return true;
   } catch (Exception e) {
      excepcion = e;
   } finally {
  }
  return false;
}


/**
*
* ElimninarTodos()
*/

public static boolean EliminarTodos() {
  excepcion = null;
  try {
      esMensaje =false;
     if (!Conectar()) {
         return false;
      }
      PreparedStatement pdelete = null;
      String sql = "delete from jos_fastball_player  ";
      pdelete= con.prepareStatement(sql);
      int filas= pdelete.executeUpdate();
      pdelete.close();
      con.close();
      if (filas <= 0){
          excepcion = new Exception("No se pudo eliminar todos los registros");
           esMensaje =true;
          return false;
      }
      return true;
   } catch (Exception e) {
      excepcion = e;
   } finally {
  }
  return false;
}


/**
*
* ExisteRegistro()
*/



public static boolean ExisteRegistro(Jos_fastball_player jos_fastball_player) {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return false;
      }
      String sql = "select * from jos_fastball_player where id='"+jos_fastball_player.getId()+"'";
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_playercon esa condicion");
       esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return false;
   }
    rs.close();
    psquery.close();
    con.close();
 return true;
} catch (Exception ex) {
      excepcion = ex;
}
  return false;
}


/**
*
* findByPrimaryKey()
*/



public static Jos_fastball_player findByPrimaryKey(Jos_fastball_player jos_fastball_player) {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return null;
      }
      String sql = "select * from jos_fastball_player where id='"+jos_fastball_player.getId()+"'";
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_playercon esa condicion");
       esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return null;
   }
   rs.beforeFirst();
   while (rs.next()) {
   
            
            
            jos_fastball_player.setId(rs.getInt("id"));
jos_fastball_player.setActive(rs.getInt("active"));
jos_fastball_player.setPlayerid(rs.getInt("playerid"));
jos_fastball_player.setTeamid(rs.getInt("teamid"));
jos_fastball_player.setFname(rs.getString("fname"));
jos_fastball_player.setMname(rs.getString("mname"));
jos_fastball_player.setLname(rs.getString("lname"));
jos_fastball_player.setPosition1(rs.getString("position1"));
jos_fastball_player.setPosition2(rs.getString("position2"));
jos_fastball_player.setPosition3(rs.getString("position3"));
jos_fastball_player.setJerseyhome(rs.getString("jerseyhome"));
jos_fastball_player.setJerseyaway(rs.getString("jerseyaway"));
jos_fastball_player.setBats(rs.getString("bats"));
jos_fastball_player.setTirar(rs.getString("tirar"));
jos_fastball_player.setBirthdate(rs.getDate("birthdate"));
jos_fastball_player.setHeightfeet(rs.getInt("heightfeet"));
jos_fastball_player.setHeightinches(rs.getInt("heightinches"));
jos_fastball_player.setWeight(rs.getInt("weight"));
jos_fastball_player.setWeightuom(rs.getString("weightuom"));
jos_fastball_player.setHometown(rs.getString("hometown"));
jos_fastball_player.setPhoto(rs.getString("photo"));
jos_fastball_player.setCphone(rs.getString("cphone"));
jos_fastball_player.setCmobile(rs.getString("cmobile"));
jos_fastball_player.setEmail(rs.getString("email"));
jos_fastball_player.setExperience(rs.getString("experience"));
jos_fastball_player.setChecked_out(rs.getBoolean("checked_out"));
jos_fastball_player.setChecked_out_time(rs.getTime("checked_out_time"));
jos_fastball_player.setPublished(rs.getBoolean("published"));
jos_fastball_player.setPlayer_custom_field1_value(rs.getString("player_custom_field1_value"));
jos_fastball_player.setPlayer_custom_field2_value(rs.getString("player_custom_field2_value"));
    }
    rs.close();
    psquery.close();
    con.close();
 return jos_fastball_player;
} catch (Exception ex) {
      excepcion = ex;
}
  return null;
}


/**
*
* findById()
*/

public static List<Jos_fastball_player> findById(Jos_fastball_player jos_fastball_player) {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return null;
      }
      List<Jos_fastball_player> list = new ArrayList<>();
      String sql = "select * from jos_fastball_player where id='"+jos_fastball_player.getId()+"'";
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_playercon esa condicion");
       esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return null;
   }
   rs.beforeFirst();
   while (rs.next()) {
   
        Jos_fastball_player jos_fastball_player2 = new Jos_fastball_player(
         rs.getInt("id"),rs.getInt("active"),rs.getInt("playerid"),rs.getInt("teamid"),rs.getString("fname"),rs.getString("mname"),rs.getString("lname"),rs.getString("position1"),rs.getString("position2"),rs.getString("position3"),rs.getString("jerseyhome"),rs.getString("jerseyaway"),rs.getString("bats"),rs.getString("tirar"),rs.getDate("birthdate"),rs.getInt("heightfeet"),rs.getInt("heightinches"),rs.getInt("weight"),rs.getString("weightuom"),rs.getString("hometown"),rs.getString("photo"),rs.getString("cphone"),rs.getString("cmobile"),rs.getString("email"),rs.getString("experience"),rs.getBoolean("checked_out"),rs.getTime("checked_out_time"),rs.getBoolean("published"),rs.getString("player_custom_field1_value"),rs.getString("player_custom_field2_value"));
            
            
       list.add(jos_fastball_player2);
    }
    rs.close();
    psquery.close();
    con.close();
    return list;
} catch (Exception ex) {
      excepcion = ex;
}
  return null;
}


/**
*
* findByActive()
*/

public static List<Jos_fastball_player> findByActive(Jos_fastball_player jos_fastball_player) {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return null;
      }
      List<Jos_fastball_player> list = new ArrayList<>();
      String sql = "select * from jos_fastball_player where active='"+jos_fastball_player.getActive()+"'";
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_playercon esa condicion");
       esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return null;
   }
   rs.beforeFirst();
   while (rs.next()) {
   
        Jos_fastball_player jos_fastball_player2 = new Jos_fastball_player(
         rs.getInt("id"),rs.getInt("active"),rs.getInt("playerid"),rs.getInt("teamid"),rs.getString("fname"),rs.getString("mname"),rs.getString("lname"),rs.getString("position1"),rs.getString("position2"),rs.getString("position3"),rs.getString("jerseyhome"),rs.getString("jerseyaway"),rs.getString("bats"),rs.getString("tirar"),rs.getDate("birthdate"),rs.getInt("heightfeet"),rs.getInt("heightinches"),rs.getInt("weight"),rs.getString("weightuom"),rs.getString("hometown"),rs.getString("photo"),rs.getString("cphone"),rs.getString("cmobile"),rs.getString("email"),rs.getString("experience"),rs.getBoolean("checked_out"),rs.getTime("checked_out_time"),rs.getBoolean("published"),rs.getString("player_custom_field1_value"),rs.getString("player_custom_field2_value"));
            
            
       list.add(jos_fastball_player2);
    }
    rs.close();
    psquery.close();
    con.close();
    return list;
} catch (Exception ex) {
      excepcion = ex;
}
  return null;
}


/**
*
* findByPlayerid()
*/

public static List<Jos_fastball_player> findByPlayerid(Jos_fastball_player jos_fastball_player) {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return null;
      }
      List<Jos_fastball_player> list = new ArrayList<>();
      String sql = "select * from jos_fastball_player where playerid='"+jos_fastball_player.getPlayerid()+"'";
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_playercon esa condicion");
       esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return null;
   }
   rs.beforeFirst();
   while (rs.next()) {
   
        Jos_fastball_player jos_fastball_player2 = new Jos_fastball_player(
         rs.getInt("id"),rs.getInt("active"),rs.getInt("playerid"),rs.getInt("teamid"),rs.getString("fname"),rs.getString("mname"),rs.getString("lname"),rs.getString("position1"),rs.getString("position2"),rs.getString("position3"),rs.getString("jerseyhome"),rs.getString("jerseyaway"),rs.getString("bats"),rs.getString("tirar"),rs.getDate("birthdate"),rs.getInt("heightfeet"),rs.getInt("heightinches"),rs.getInt("weight"),rs.getString("weightuom"),rs.getString("hometown"),rs.getString("photo"),rs.getString("cphone"),rs.getString("cmobile"),rs.getString("email"),rs.getString("experience"),rs.getBoolean("checked_out"),rs.getTime("checked_out_time"),rs.getBoolean("published"),rs.getString("player_custom_field1_value"),rs.getString("player_custom_field2_value"));
            
            
       list.add(jos_fastball_player2);
    }
    rs.close();
    psquery.close();
    con.close();
    return list;
} catch (Exception ex) {
      excepcion = ex;
}
  return null;
}


/**
*
* findByTeamid()
*/

public static List<Jos_fastball_player> findByTeamid(Jos_fastball_player jos_fastball_player) {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return null;
      }
      List<Jos_fastball_player> list = new ArrayList<>();
      String sql = "select * from jos_fastball_player where teamid='"+jos_fastball_player.getTeamid()+"'";
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_playercon esa condicion");
       esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return null;
   }
   rs.beforeFirst();
   while (rs.next()) {
   
        Jos_fastball_player jos_fastball_player2 = new Jos_fastball_player(
         rs.getInt("id"),rs.getInt("active"),rs.getInt("playerid"),rs.getInt("teamid"),rs.getString("fname"),rs.getString("mname"),rs.getString("lname"),rs.getString("position1"),rs.getString("position2"),rs.getString("position3"),rs.getString("jerseyhome"),rs.getString("jerseyaway"),rs.getString("bats"),rs.getString("tirar"),rs.getDate("birthdate"),rs.getInt("heightfeet"),rs.getInt("heightinches"),rs.getInt("weight"),rs.getString("weightuom"),rs.getString("hometown"),rs.getString("photo"),rs.getString("cphone"),rs.getString("cmobile"),rs.getString("email"),rs.getString("experience"),rs.getBoolean("checked_out"),rs.getTime("checked_out_time"),rs.getBoolean("published"),rs.getString("player_custom_field1_value"),rs.getString("player_custom_field2_value"));
            
            
       list.add(jos_fastball_player2);
    }
    rs.close();
    psquery.close();
    con.close();
    return list;
} catch (Exception ex) {
      excepcion = ex;
}
  return null;
}


/**
*
* findByFname()
*/

public static List<Jos_fastball_player> findByFname(Jos_fastball_player jos_fastball_player) {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return null;
      }
      List<Jos_fastball_player> list = new ArrayList<>();
      String sql = "select * from jos_fastball_player where fname='"+jos_fastball_player.getFname()+"'";
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_playercon esa condicion");
       esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return null;
   }
   rs.beforeFirst();
   while (rs.next()) {
   
        Jos_fastball_player jos_fastball_player2 = new Jos_fastball_player(
         rs.getInt("id"),rs.getInt("active"),rs.getInt("playerid"),rs.getInt("teamid"),rs.getString("fname"),rs.getString("mname"),rs.getString("lname"),rs.getString("position1"),rs.getString("position2"),rs.getString("position3"),rs.getString("jerseyhome"),rs.getString("jerseyaway"),rs.getString("bats"),rs.getString("tirar"),rs.getDate("birthdate"),rs.getInt("heightfeet"),rs.getInt("heightinches"),rs.getInt("weight"),rs.getString("weightuom"),rs.getString("hometown"),rs.getString("photo"),rs.getString("cphone"),rs.getString("cmobile"),rs.getString("email"),rs.getString("experience"),rs.getBoolean("checked_out"),rs.getTime("checked_out_time"),rs.getBoolean("published"),rs.getString("player_custom_field1_value"),rs.getString("player_custom_field2_value"));
            
            
       list.add(jos_fastball_player2);
    }
    rs.close();
    psquery.close();
    con.close();
    return list;
} catch (Exception ex) {
      excepcion = ex;
}
  return null;
}


/**
*
* findByMname()
*/

public static List<Jos_fastball_player> findByMname(Jos_fastball_player jos_fastball_player) {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return null;
      }
      List<Jos_fastball_player> list = new ArrayList<>();
      String sql = "select * from jos_fastball_player where mname='"+jos_fastball_player.getMname()+"'";
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_playercon esa condicion");
       esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return null;
   }
   rs.beforeFirst();
   while (rs.next()) {
   
        Jos_fastball_player jos_fastball_player2 = new Jos_fastball_player(
         rs.getInt("id"),rs.getInt("active"),rs.getInt("playerid"),rs.getInt("teamid"),rs.getString("fname"),rs.getString("mname"),rs.getString("lname"),rs.getString("position1"),rs.getString("position2"),rs.getString("position3"),rs.getString("jerseyhome"),rs.getString("jerseyaway"),rs.getString("bats"),rs.getString("tirar"),rs.getDate("birthdate"),rs.getInt("heightfeet"),rs.getInt("heightinches"),rs.getInt("weight"),rs.getString("weightuom"),rs.getString("hometown"),rs.getString("photo"),rs.getString("cphone"),rs.getString("cmobile"),rs.getString("email"),rs.getString("experience"),rs.getBoolean("checked_out"),rs.getTime("checked_out_time"),rs.getBoolean("published"),rs.getString("player_custom_field1_value"),rs.getString("player_custom_field2_value"));
            
            
       list.add(jos_fastball_player2);
    }
    rs.close();
    psquery.close();
    con.close();
    return list;
} catch (Exception ex) {
      excepcion = ex;
}
  return null;
}


/**
*
* findByLname()
*/

public static List<Jos_fastball_player> findByLname(Jos_fastball_player jos_fastball_player) {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return null;
      }
      List<Jos_fastball_player> list = new ArrayList<>();
      String sql = "select * from jos_fastball_player where lname='"+jos_fastball_player.getLname()+"'";
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_playercon esa condicion");
       esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return null;
   }
   rs.beforeFirst();
   while (rs.next()) {
   
        Jos_fastball_player jos_fastball_player2 = new Jos_fastball_player(
         rs.getInt("id"),rs.getInt("active"),rs.getInt("playerid"),rs.getInt("teamid"),rs.getString("fname"),rs.getString("mname"),rs.getString("lname"),rs.getString("position1"),rs.getString("position2"),rs.getString("position3"),rs.getString("jerseyhome"),rs.getString("jerseyaway"),rs.getString("bats"),rs.getString("tirar"),rs.getDate("birthdate"),rs.getInt("heightfeet"),rs.getInt("heightinches"),rs.getInt("weight"),rs.getString("weightuom"),rs.getString("hometown"),rs.getString("photo"),rs.getString("cphone"),rs.getString("cmobile"),rs.getString("email"),rs.getString("experience"),rs.getBoolean("checked_out"),rs.getTime("checked_out_time"),rs.getBoolean("published"),rs.getString("player_custom_field1_value"),rs.getString("player_custom_field2_value"));
            
            
       list.add(jos_fastball_player2);
    }
    rs.close();
    psquery.close();
    con.close();
    return list;
} catch (Exception ex) {
      excepcion = ex;
}
  return null;
}


/**
*
* findByPosition1()
*/

public static List<Jos_fastball_player> findByPosition1(Jos_fastball_player jos_fastball_player) {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return null;
      }
      List<Jos_fastball_player> list = new ArrayList<>();
      String sql = "select * from jos_fastball_player where position1='"+jos_fastball_player.getPosition1()+"'";
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_playercon esa condicion");
       esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return null;
   }
   rs.beforeFirst();
   while (rs.next()) {
   
        Jos_fastball_player jos_fastball_player2 = new Jos_fastball_player(
         rs.getInt("id"),rs.getInt("active"),rs.getInt("playerid"),rs.getInt("teamid"),rs.getString("fname"),rs.getString("mname"),rs.getString("lname"),rs.getString("position1"),rs.getString("position2"),rs.getString("position3"),rs.getString("jerseyhome"),rs.getString("jerseyaway"),rs.getString("bats"),rs.getString("tirar"),rs.getDate("birthdate"),rs.getInt("heightfeet"),rs.getInt("heightinches"),rs.getInt("weight"),rs.getString("weightuom"),rs.getString("hometown"),rs.getString("photo"),rs.getString("cphone"),rs.getString("cmobile"),rs.getString("email"),rs.getString("experience"),rs.getBoolean("checked_out"),rs.getTime("checked_out_time"),rs.getBoolean("published"),rs.getString("player_custom_field1_value"),rs.getString("player_custom_field2_value"));
            
            
       list.add(jos_fastball_player2);
    }
    rs.close();
    psquery.close();
    con.close();
    return list;
} catch (Exception ex) {
      excepcion = ex;
}
  return null;
}


/**
*
* findByPosition2()
*/

public static List<Jos_fastball_player> findByPosition2(Jos_fastball_player jos_fastball_player) {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return null;
      }
      List<Jos_fastball_player> list = new ArrayList<>();
      String sql = "select * from jos_fastball_player where position2='"+jos_fastball_player.getPosition2()+"'";
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_playercon esa condicion");
       esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return null;
   }
   rs.beforeFirst();
   while (rs.next()) {
   
        Jos_fastball_player jos_fastball_player2 = new Jos_fastball_player(
         rs.getInt("id"),rs.getInt("active"),rs.getInt("playerid"),rs.getInt("teamid"),rs.getString("fname"),rs.getString("mname"),rs.getString("lname"),rs.getString("position1"),rs.getString("position2"),rs.getString("position3"),rs.getString("jerseyhome"),rs.getString("jerseyaway"),rs.getString("bats"),rs.getString("tirar"),rs.getDate("birthdate"),rs.getInt("heightfeet"),rs.getInt("heightinches"),rs.getInt("weight"),rs.getString("weightuom"),rs.getString("hometown"),rs.getString("photo"),rs.getString("cphone"),rs.getString("cmobile"),rs.getString("email"),rs.getString("experience"),rs.getBoolean("checked_out"),rs.getTime("checked_out_time"),rs.getBoolean("published"),rs.getString("player_custom_field1_value"),rs.getString("player_custom_field2_value"));
            
            
       list.add(jos_fastball_player2);
    }
    rs.close();
    psquery.close();
    con.close();
    return list;
} catch (Exception ex) {
      excepcion = ex;
}
  return null;
}


/**
*
* findByPosition3()
*/

public static List<Jos_fastball_player> findByPosition3(Jos_fastball_player jos_fastball_player) {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return null;
      }
      List<Jos_fastball_player> list = new ArrayList<>();
      String sql = "select * from jos_fastball_player where position3='"+jos_fastball_player.getPosition3()+"'";
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_playercon esa condicion");
       esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return null;
   }
   rs.beforeFirst();
   while (rs.next()) {
   
        Jos_fastball_player jos_fastball_player2 = new Jos_fastball_player(
         rs.getInt("id"),rs.getInt("active"),rs.getInt("playerid"),rs.getInt("teamid"),rs.getString("fname"),rs.getString("mname"),rs.getString("lname"),rs.getString("position1"),rs.getString("position2"),rs.getString("position3"),rs.getString("jerseyhome"),rs.getString("jerseyaway"),rs.getString("bats"),rs.getString("tirar"),rs.getDate("birthdate"),rs.getInt("heightfeet"),rs.getInt("heightinches"),rs.getInt("weight"),rs.getString("weightuom"),rs.getString("hometown"),rs.getString("photo"),rs.getString("cphone"),rs.getString("cmobile"),rs.getString("email"),rs.getString("experience"),rs.getBoolean("checked_out"),rs.getTime("checked_out_time"),rs.getBoolean("published"),rs.getString("player_custom_field1_value"),rs.getString("player_custom_field2_value"));
            
            
       list.add(jos_fastball_player2);
    }
    rs.close();
    psquery.close();
    con.close();
    return list;
} catch (Exception ex) {
      excepcion = ex;
}
  return null;
}


/**
*
* findByJerseyhome()
*/

public static List<Jos_fastball_player> findByJerseyhome(Jos_fastball_player jos_fastball_player) {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return null;
      }
      List<Jos_fastball_player> list = new ArrayList<>();
      String sql = "select * from jos_fastball_player where jerseyhome='"+jos_fastball_player.getJerseyhome()+"'";
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_playercon esa condicion");
       esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return null;
   }
   rs.beforeFirst();
   while (rs.next()) {
   
        Jos_fastball_player jos_fastball_player2 = new Jos_fastball_player(
         rs.getInt("id"),rs.getInt("active"),rs.getInt("playerid"),rs.getInt("teamid"),rs.getString("fname"),rs.getString("mname"),rs.getString("lname"),rs.getString("position1"),rs.getString("position2"),rs.getString("position3"),rs.getString("jerseyhome"),rs.getString("jerseyaway"),rs.getString("bats"),rs.getString("tirar"),rs.getDate("birthdate"),rs.getInt("heightfeet"),rs.getInt("heightinches"),rs.getInt("weight"),rs.getString("weightuom"),rs.getString("hometown"),rs.getString("photo"),rs.getString("cphone"),rs.getString("cmobile"),rs.getString("email"),rs.getString("experience"),rs.getBoolean("checked_out"),rs.getTime("checked_out_time"),rs.getBoolean("published"),rs.getString("player_custom_field1_value"),rs.getString("player_custom_field2_value"));
            
            
       list.add(jos_fastball_player2);
    }
    rs.close();
    psquery.close();
    con.close();
    return list;
} catch (Exception ex) {
      excepcion = ex;
}
  return null;
}


/**
*
* findByJerseyaway()
*/

public static List<Jos_fastball_player> findByJerseyaway(Jos_fastball_player jos_fastball_player) {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return null;
      }
      List<Jos_fastball_player> list = new ArrayList<>();
      String sql = "select * from jos_fastball_player where jerseyaway='"+jos_fastball_player.getJerseyaway()+"'";
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_playercon esa condicion");
       esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return null;
   }
   rs.beforeFirst();
   while (rs.next()) {
   
        Jos_fastball_player jos_fastball_player2 = new Jos_fastball_player(
         rs.getInt("id"),rs.getInt("active"),rs.getInt("playerid"),rs.getInt("teamid"),rs.getString("fname"),rs.getString("mname"),rs.getString("lname"),rs.getString("position1"),rs.getString("position2"),rs.getString("position3"),rs.getString("jerseyhome"),rs.getString("jerseyaway"),rs.getString("bats"),rs.getString("tirar"),rs.getDate("birthdate"),rs.getInt("heightfeet"),rs.getInt("heightinches"),rs.getInt("weight"),rs.getString("weightuom"),rs.getString("hometown"),rs.getString("photo"),rs.getString("cphone"),rs.getString("cmobile"),rs.getString("email"),rs.getString("experience"),rs.getBoolean("checked_out"),rs.getTime("checked_out_time"),rs.getBoolean("published"),rs.getString("player_custom_field1_value"),rs.getString("player_custom_field2_value"));
            
            
       list.add(jos_fastball_player2);
    }
    rs.close();
    psquery.close();
    con.close();
    return list;
} catch (Exception ex) {
      excepcion = ex;
}
  return null;
}


/**
*
* findByBats()
*/

public static List<Jos_fastball_player> findByBats(Jos_fastball_player jos_fastball_player) {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return null;
      }
      List<Jos_fastball_player> list = new ArrayList<>();
      String sql = "select * from jos_fastball_player where bats='"+jos_fastball_player.getBats()+"'";
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_playercon esa condicion");
       esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return null;
   }
   rs.beforeFirst();
   while (rs.next()) {
   
        Jos_fastball_player jos_fastball_player2 = new Jos_fastball_player(
         rs.getInt("id"),rs.getInt("active"),rs.getInt("playerid"),rs.getInt("teamid"),rs.getString("fname"),rs.getString("mname"),rs.getString("lname"),rs.getString("position1"),rs.getString("position2"),rs.getString("position3"),rs.getString("jerseyhome"),rs.getString("jerseyaway"),rs.getString("bats"),rs.getString("tirar"),rs.getDate("birthdate"),rs.getInt("heightfeet"),rs.getInt("heightinches"),rs.getInt("weight"),rs.getString("weightuom"),rs.getString("hometown"),rs.getString("photo"),rs.getString("cphone"),rs.getString("cmobile"),rs.getString("email"),rs.getString("experience"),rs.getBoolean("checked_out"),rs.getTime("checked_out_time"),rs.getBoolean("published"),rs.getString("player_custom_field1_value"),rs.getString("player_custom_field2_value"));
            
            
       list.add(jos_fastball_player2);
    }
    rs.close();
    psquery.close();
    con.close();
    return list;
} catch (Exception ex) {
      excepcion = ex;
}
  return null;
}


/**
*
* findByTirar()
*/

public static List<Jos_fastball_player> findByTirar(Jos_fastball_player jos_fastball_player) {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return null;
      }
      List<Jos_fastball_player> list = new ArrayList<>();
      String sql = "select * from jos_fastball_player where tirar='"+jos_fastball_player.getTirar()+"'";
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_playercon esa condicion");
       esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return null;
   }
   rs.beforeFirst();
   while (rs.next()) {
   
        Jos_fastball_player jos_fastball_player2 = new Jos_fastball_player(
         rs.getInt("id"),rs.getInt("active"),rs.getInt("playerid"),rs.getInt("teamid"),rs.getString("fname"),rs.getString("mname"),rs.getString("lname"),rs.getString("position1"),rs.getString("position2"),rs.getString("position3"),rs.getString("jerseyhome"),rs.getString("jerseyaway"),rs.getString("bats"),rs.getString("tirar"),rs.getDate("birthdate"),rs.getInt("heightfeet"),rs.getInt("heightinches"),rs.getInt("weight"),rs.getString("weightuom"),rs.getString("hometown"),rs.getString("photo"),rs.getString("cphone"),rs.getString("cmobile"),rs.getString("email"),rs.getString("experience"),rs.getBoolean("checked_out"),rs.getTime("checked_out_time"),rs.getBoolean("published"),rs.getString("player_custom_field1_value"),rs.getString("player_custom_field2_value"));
            
            
       list.add(jos_fastball_player2);
    }
    rs.close();
    psquery.close();
    con.close();
    return list;
} catch (Exception ex) {
      excepcion = ex;
}
  return null;
}


/**
*
* findByBirthdate()
*/

public static List<Jos_fastball_player> findByBirthdate(Jos_fastball_player jos_fastball_player) {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return null;
      }
      List<Jos_fastball_player> list = new ArrayList<>();
      String sql = "select * from jos_fastball_player where birthdate='"+jos_fastball_player.getBirthdate()+"'";
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_playercon esa condicion");
       esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return null;
   }
   rs.beforeFirst();
   while (rs.next()) {
   
        Jos_fastball_player jos_fastball_player2 = new Jos_fastball_player(
         rs.getInt("id"),rs.getInt("active"),rs.getInt("playerid"),rs.getInt("teamid"),rs.getString("fname"),rs.getString("mname"),rs.getString("lname"),rs.getString("position1"),rs.getString("position2"),rs.getString("position3"),rs.getString("jerseyhome"),rs.getString("jerseyaway"),rs.getString("bats"),rs.getString("tirar"),rs.getDate("birthdate"),rs.getInt("heightfeet"),rs.getInt("heightinches"),rs.getInt("weight"),rs.getString("weightuom"),rs.getString("hometown"),rs.getString("photo"),rs.getString("cphone"),rs.getString("cmobile"),rs.getString("email"),rs.getString("experience"),rs.getBoolean("checked_out"),rs.getTime("checked_out_time"),rs.getBoolean("published"),rs.getString("player_custom_field1_value"),rs.getString("player_custom_field2_value"));
            
            
       list.add(jos_fastball_player2);
    }
    rs.close();
    psquery.close();
    con.close();
    return list;
} catch (Exception ex) {
      excepcion = ex;
}
  return null;
}


/**
*
* findByHeightfeet()
*/

public static List<Jos_fastball_player> findByHeightfeet(Jos_fastball_player jos_fastball_player) {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return null;
      }
      List<Jos_fastball_player> list = new ArrayList<>();
      String sql = "select * from jos_fastball_player where heightfeet='"+jos_fastball_player.getHeightfeet()+"'";
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_playercon esa condicion");
       esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return null;
   }
   rs.beforeFirst();
   while (rs.next()) {
   
        Jos_fastball_player jos_fastball_player2 = new Jos_fastball_player(
         rs.getInt("id"),rs.getInt("active"),rs.getInt("playerid"),rs.getInt("teamid"),rs.getString("fname"),rs.getString("mname"),rs.getString("lname"),rs.getString("position1"),rs.getString("position2"),rs.getString("position3"),rs.getString("jerseyhome"),rs.getString("jerseyaway"),rs.getString("bats"),rs.getString("tirar"),rs.getDate("birthdate"),rs.getInt("heightfeet"),rs.getInt("heightinches"),rs.getInt("weight"),rs.getString("weightuom"),rs.getString("hometown"),rs.getString("photo"),rs.getString("cphone"),rs.getString("cmobile"),rs.getString("email"),rs.getString("experience"),rs.getBoolean("checked_out"),rs.getTime("checked_out_time"),rs.getBoolean("published"),rs.getString("player_custom_field1_value"),rs.getString("player_custom_field2_value"));
            
            
       list.add(jos_fastball_player2);
    }
    rs.close();
    psquery.close();
    con.close();
    return list;
} catch (Exception ex) {
      excepcion = ex;
}
  return null;
}


/**
*
* findByHeightinches()
*/

public static List<Jos_fastball_player> findByHeightinches(Jos_fastball_player jos_fastball_player) {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return null;
      }
      List<Jos_fastball_player> list = new ArrayList<>();
      String sql = "select * from jos_fastball_player where heightinches='"+jos_fastball_player.getHeightinches()+"'";
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_playercon esa condicion");
       esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return null;
   }
   rs.beforeFirst();
   while (rs.next()) {
   
        Jos_fastball_player jos_fastball_player2 = new Jos_fastball_player(
         rs.getInt("id"),rs.getInt("active"),rs.getInt("playerid"),rs.getInt("teamid"),rs.getString("fname"),rs.getString("mname"),rs.getString("lname"),rs.getString("position1"),rs.getString("position2"),rs.getString("position3"),rs.getString("jerseyhome"),rs.getString("jerseyaway"),rs.getString("bats"),rs.getString("tirar"),rs.getDate("birthdate"),rs.getInt("heightfeet"),rs.getInt("heightinches"),rs.getInt("weight"),rs.getString("weightuom"),rs.getString("hometown"),rs.getString("photo"),rs.getString("cphone"),rs.getString("cmobile"),rs.getString("email"),rs.getString("experience"),rs.getBoolean("checked_out"),rs.getTime("checked_out_time"),rs.getBoolean("published"),rs.getString("player_custom_field1_value"),rs.getString("player_custom_field2_value"));
            
            
       list.add(jos_fastball_player2);
    }
    rs.close();
    psquery.close();
    con.close();
    return list;
} catch (Exception ex) {
      excepcion = ex;
}
  return null;
}


/**
*
* findByWeight()
*/

public static List<Jos_fastball_player> findByWeight(Jos_fastball_player jos_fastball_player) {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return null;
      }
      List<Jos_fastball_player> list = new ArrayList<>();
      String sql = "select * from jos_fastball_player where weight='"+jos_fastball_player.getWeight()+"'";
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_playercon esa condicion");
       esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return null;
   }
   rs.beforeFirst();
   while (rs.next()) {
   
        Jos_fastball_player jos_fastball_player2 = new Jos_fastball_player(
         rs.getInt("id"),rs.getInt("active"),rs.getInt("playerid"),rs.getInt("teamid"),rs.getString("fname"),rs.getString("mname"),rs.getString("lname"),rs.getString("position1"),rs.getString("position2"),rs.getString("position3"),rs.getString("jerseyhome"),rs.getString("jerseyaway"),rs.getString("bats"),rs.getString("tirar"),rs.getDate("birthdate"),rs.getInt("heightfeet"),rs.getInt("heightinches"),rs.getInt("weight"),rs.getString("weightuom"),rs.getString("hometown"),rs.getString("photo"),rs.getString("cphone"),rs.getString("cmobile"),rs.getString("email"),rs.getString("experience"),rs.getBoolean("checked_out"),rs.getTime("checked_out_time"),rs.getBoolean("published"),rs.getString("player_custom_field1_value"),rs.getString("player_custom_field2_value"));
            
            
       list.add(jos_fastball_player2);
    }
    rs.close();
    psquery.close();
    con.close();
    return list;
} catch (Exception ex) {
      excepcion = ex;
}
  return null;
}


/**
*
* findByWeightuom()
*/

public static List<Jos_fastball_player> findByWeightuom(Jos_fastball_player jos_fastball_player) {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return null;
      }
      List<Jos_fastball_player> list = new ArrayList<>();
      String sql = "select * from jos_fastball_player where weightuom='"+jos_fastball_player.getWeightuom()+"'";
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_playercon esa condicion");
       esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return null;
   }
   rs.beforeFirst();
   while (rs.next()) {
   
        Jos_fastball_player jos_fastball_player2 = new Jos_fastball_player(
         rs.getInt("id"),rs.getInt("active"),rs.getInt("playerid"),rs.getInt("teamid"),rs.getString("fname"),rs.getString("mname"),rs.getString("lname"),rs.getString("position1"),rs.getString("position2"),rs.getString("position3"),rs.getString("jerseyhome"),rs.getString("jerseyaway"),rs.getString("bats"),rs.getString("tirar"),rs.getDate("birthdate"),rs.getInt("heightfeet"),rs.getInt("heightinches"),rs.getInt("weight"),rs.getString("weightuom"),rs.getString("hometown"),rs.getString("photo"),rs.getString("cphone"),rs.getString("cmobile"),rs.getString("email"),rs.getString("experience"),rs.getBoolean("checked_out"),rs.getTime("checked_out_time"),rs.getBoolean("published"),rs.getString("player_custom_field1_value"),rs.getString("player_custom_field2_value"));
            
            
       list.add(jos_fastball_player2);
    }
    rs.close();
    psquery.close();
    con.close();
    return list;
} catch (Exception ex) {
      excepcion = ex;
}
  return null;
}


/**
*
* findByHometown()
*/

public static List<Jos_fastball_player> findByHometown(Jos_fastball_player jos_fastball_player) {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return null;
      }
      List<Jos_fastball_player> list = new ArrayList<>();
      String sql = "select * from jos_fastball_player where hometown='"+jos_fastball_player.getHometown()+"'";
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_playercon esa condicion");
       esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return null;
   }
   rs.beforeFirst();
   while (rs.next()) {
   
        Jos_fastball_player jos_fastball_player2 = new Jos_fastball_player(
         rs.getInt("id"),rs.getInt("active"),rs.getInt("playerid"),rs.getInt("teamid"),rs.getString("fname"),rs.getString("mname"),rs.getString("lname"),rs.getString("position1"),rs.getString("position2"),rs.getString("position3"),rs.getString("jerseyhome"),rs.getString("jerseyaway"),rs.getString("bats"),rs.getString("tirar"),rs.getDate("birthdate"),rs.getInt("heightfeet"),rs.getInt("heightinches"),rs.getInt("weight"),rs.getString("weightuom"),rs.getString("hometown"),rs.getString("photo"),rs.getString("cphone"),rs.getString("cmobile"),rs.getString("email"),rs.getString("experience"),rs.getBoolean("checked_out"),rs.getTime("checked_out_time"),rs.getBoolean("published"),rs.getString("player_custom_field1_value"),rs.getString("player_custom_field2_value"));
            
            
       list.add(jos_fastball_player2);
    }
    rs.close();
    psquery.close();
    con.close();
    return list;
} catch (Exception ex) {
      excepcion = ex;
}
  return null;
}


/**
*
* findByPhoto()
*/

public static List<Jos_fastball_player> findByPhoto(Jos_fastball_player jos_fastball_player) {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return null;
      }
      List<Jos_fastball_player> list = new ArrayList<>();
      String sql = "select * from jos_fastball_player where photo='"+jos_fastball_player.getPhoto()+"'";
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_playercon esa condicion");
       esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return null;
   }
   rs.beforeFirst();
   while (rs.next()) {
   
        Jos_fastball_player jos_fastball_player2 = new Jos_fastball_player(
         rs.getInt("id"),rs.getInt("active"),rs.getInt("playerid"),rs.getInt("teamid"),rs.getString("fname"),rs.getString("mname"),rs.getString("lname"),rs.getString("position1"),rs.getString("position2"),rs.getString("position3"),rs.getString("jerseyhome"),rs.getString("jerseyaway"),rs.getString("bats"),rs.getString("tirar"),rs.getDate("birthdate"),rs.getInt("heightfeet"),rs.getInt("heightinches"),rs.getInt("weight"),rs.getString("weightuom"),rs.getString("hometown"),rs.getString("photo"),rs.getString("cphone"),rs.getString("cmobile"),rs.getString("email"),rs.getString("experience"),rs.getBoolean("checked_out"),rs.getTime("checked_out_time"),rs.getBoolean("published"),rs.getString("player_custom_field1_value"),rs.getString("player_custom_field2_value"));
            
            
       list.add(jos_fastball_player2);
    }
    rs.close();
    psquery.close();
    con.close();
    return list;
} catch (Exception ex) {
      excepcion = ex;
}
  return null;
}


/**
*
* findByCphone()
*/

public static List<Jos_fastball_player> findByCphone(Jos_fastball_player jos_fastball_player) {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return null;
      }
      List<Jos_fastball_player> list = new ArrayList<>();
      String sql = "select * from jos_fastball_player where cphone='"+jos_fastball_player.getCphone()+"'";
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_playercon esa condicion");
       esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return null;
   }
   rs.beforeFirst();
   while (rs.next()) {
   
        Jos_fastball_player jos_fastball_player2 = new Jos_fastball_player(
         rs.getInt("id"),rs.getInt("active"),rs.getInt("playerid"),rs.getInt("teamid"),rs.getString("fname"),rs.getString("mname"),rs.getString("lname"),rs.getString("position1"),rs.getString("position2"),rs.getString("position3"),rs.getString("jerseyhome"),rs.getString("jerseyaway"),rs.getString("bats"),rs.getString("tirar"),rs.getDate("birthdate"),rs.getInt("heightfeet"),rs.getInt("heightinches"),rs.getInt("weight"),rs.getString("weightuom"),rs.getString("hometown"),rs.getString("photo"),rs.getString("cphone"),rs.getString("cmobile"),rs.getString("email"),rs.getString("experience"),rs.getBoolean("checked_out"),rs.getTime("checked_out_time"),rs.getBoolean("published"),rs.getString("player_custom_field1_value"),rs.getString("player_custom_field2_value"));
            
            
       list.add(jos_fastball_player2);
    }
    rs.close();
    psquery.close();
    con.close();
    return list;
} catch (Exception ex) {
      excepcion = ex;
}
  return null;
}


/**
*
* findByCmobile()
*/

public static List<Jos_fastball_player> findByCmobile(Jos_fastball_player jos_fastball_player) {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return null;
      }
      List<Jos_fastball_player> list = new ArrayList<>();
      String sql = "select * from jos_fastball_player where cmobile='"+jos_fastball_player.getCmobile()+"'";
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_playercon esa condicion");
       esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return null;
   }
   rs.beforeFirst();
   while (rs.next()) {
   
        Jos_fastball_player jos_fastball_player2 = new Jos_fastball_player(
         rs.getInt("id"),rs.getInt("active"),rs.getInt("playerid"),rs.getInt("teamid"),rs.getString("fname"),rs.getString("mname"),rs.getString("lname"),rs.getString("position1"),rs.getString("position2"),rs.getString("position3"),rs.getString("jerseyhome"),rs.getString("jerseyaway"),rs.getString("bats"),rs.getString("tirar"),rs.getDate("birthdate"),rs.getInt("heightfeet"),rs.getInt("heightinches"),rs.getInt("weight"),rs.getString("weightuom"),rs.getString("hometown"),rs.getString("photo"),rs.getString("cphone"),rs.getString("cmobile"),rs.getString("email"),rs.getString("experience"),rs.getBoolean("checked_out"),rs.getTime("checked_out_time"),rs.getBoolean("published"),rs.getString("player_custom_field1_value"),rs.getString("player_custom_field2_value"));
            
            
       list.add(jos_fastball_player2);
    }
    rs.close();
    psquery.close();
    con.close();
    return list;
} catch (Exception ex) {
      excepcion = ex;
}
  return null;
}


/**
*
* findByEmail()
*/

public static List<Jos_fastball_player> findByEmail(Jos_fastball_player jos_fastball_player) {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return null;
      }
      List<Jos_fastball_player> list = new ArrayList<>();
      String sql = "select * from jos_fastball_player where email='"+jos_fastball_player.getEmail()+"'";
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_playercon esa condicion");
       esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return null;
   }
   rs.beforeFirst();
   while (rs.next()) {
   
        Jos_fastball_player jos_fastball_player2 = new Jos_fastball_player(
         rs.getInt("id"),rs.getInt("active"),rs.getInt("playerid"),rs.getInt("teamid"),rs.getString("fname"),rs.getString("mname"),rs.getString("lname"),rs.getString("position1"),rs.getString("position2"),rs.getString("position3"),rs.getString("jerseyhome"),rs.getString("jerseyaway"),rs.getString("bats"),rs.getString("tirar"),rs.getDate("birthdate"),rs.getInt("heightfeet"),rs.getInt("heightinches"),rs.getInt("weight"),rs.getString("weightuom"),rs.getString("hometown"),rs.getString("photo"),rs.getString("cphone"),rs.getString("cmobile"),rs.getString("email"),rs.getString("experience"),rs.getBoolean("checked_out"),rs.getTime("checked_out_time"),rs.getBoolean("published"),rs.getString("player_custom_field1_value"),rs.getString("player_custom_field2_value"));
            
            
       list.add(jos_fastball_player2);
    }
    rs.close();
    psquery.close();
    con.close();
    return list;
} catch (Exception ex) {
      excepcion = ex;
}
  return null;
}


/**
*
* findByExperience()
*/

public static List<Jos_fastball_player> findByExperience(Jos_fastball_player jos_fastball_player) {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return null;
      }
      List<Jos_fastball_player> list = new ArrayList<>();
      String sql = "select * from jos_fastball_player where experience='"+jos_fastball_player.getExperience()+"'";
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_playercon esa condicion");
       esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return null;
   }
   rs.beforeFirst();
   while (rs.next()) {
   
        Jos_fastball_player jos_fastball_player2 = new Jos_fastball_player(
         rs.getInt("id"),rs.getInt("active"),rs.getInt("playerid"),rs.getInt("teamid"),rs.getString("fname"),rs.getString("mname"),rs.getString("lname"),rs.getString("position1"),rs.getString("position2"),rs.getString("position3"),rs.getString("jerseyhome"),rs.getString("jerseyaway"),rs.getString("bats"),rs.getString("tirar"),rs.getDate("birthdate"),rs.getInt("heightfeet"),rs.getInt("heightinches"),rs.getInt("weight"),rs.getString("weightuom"),rs.getString("hometown"),rs.getString("photo"),rs.getString("cphone"),rs.getString("cmobile"),rs.getString("email"),rs.getString("experience"),rs.getBoolean("checked_out"),rs.getTime("checked_out_time"),rs.getBoolean("published"),rs.getString("player_custom_field1_value"),rs.getString("player_custom_field2_value"));
            
            
       list.add(jos_fastball_player2);
    }
    rs.close();
    psquery.close();
    con.close();
    return list;
} catch (Exception ex) {
      excepcion = ex;
}
  return null;
}


/**
*
* findByChecked_out()
*/

public static List<Jos_fastball_player> findByChecked_out(Jos_fastball_player jos_fastball_player) {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return null;
      }
      List<Jos_fastball_player> list = new ArrayList<>();
      String sql = "select * from jos_fastball_player where checked_out='"+jos_fastball_player.getChecked_out()+"'";
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_playercon esa condicion");
       esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return null;
   }
   rs.beforeFirst();
   while (rs.next()) {
   
        Jos_fastball_player jos_fastball_player2 = new Jos_fastball_player(
         rs.getInt("id"),rs.getInt("active"),rs.getInt("playerid"),rs.getInt("teamid"),rs.getString("fname"),rs.getString("mname"),rs.getString("lname"),rs.getString("position1"),rs.getString("position2"),rs.getString("position3"),rs.getString("jerseyhome"),rs.getString("jerseyaway"),rs.getString("bats"),rs.getString("tirar"),rs.getDate("birthdate"),rs.getInt("heightfeet"),rs.getInt("heightinches"),rs.getInt("weight"),rs.getString("weightuom"),rs.getString("hometown"),rs.getString("photo"),rs.getString("cphone"),rs.getString("cmobile"),rs.getString("email"),rs.getString("experience"),rs.getBoolean("checked_out"),rs.getTime("checked_out_time"),rs.getBoolean("published"),rs.getString("player_custom_field1_value"),rs.getString("player_custom_field2_value"));
            
            
       list.add(jos_fastball_player2);
    }
    rs.close();
    psquery.close();
    con.close();
    return list;
} catch (Exception ex) {
      excepcion = ex;
}
  return null;
}


/**
*
* findByChecked_out_time()
*/

public static List<Jos_fastball_player> findByChecked_out_time(Jos_fastball_player jos_fastball_player) {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return null;
      }
      List<Jos_fastball_player> list = new ArrayList<>();
      String sql = "select * from jos_fastball_player where checked_out_time='"+jos_fastball_player.getChecked_out_time()+"'";
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_playercon esa condicion");
       esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return null;
   }
   rs.beforeFirst();
   while (rs.next()) {
   
        Jos_fastball_player jos_fastball_player2 = new Jos_fastball_player(
         rs.getInt("id"),rs.getInt("active"),rs.getInt("playerid"),rs.getInt("teamid"),rs.getString("fname"),rs.getString("mname"),rs.getString("lname"),rs.getString("position1"),rs.getString("position2"),rs.getString("position3"),rs.getString("jerseyhome"),rs.getString("jerseyaway"),rs.getString("bats"),rs.getString("tirar"),rs.getDate("birthdate"),rs.getInt("heightfeet"),rs.getInt("heightinches"),rs.getInt("weight"),rs.getString("weightuom"),rs.getString("hometown"),rs.getString("photo"),rs.getString("cphone"),rs.getString("cmobile"),rs.getString("email"),rs.getString("experience"),rs.getBoolean("checked_out"),rs.getTime("checked_out_time"),rs.getBoolean("published"),rs.getString("player_custom_field1_value"),rs.getString("player_custom_field2_value"));
            
            
       list.add(jos_fastball_player2);
    }
    rs.close();
    psquery.close();
    con.close();
    return list;
} catch (Exception ex) {
      excepcion = ex;
}
  return null;
}


/**
*
* findByPublished()
*/

public static List<Jos_fastball_player> findByPublished(Jos_fastball_player jos_fastball_player) {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return null;
      }
      List<Jos_fastball_player> list = new ArrayList<>();
      String sql = "select * from jos_fastball_player where published='"+jos_fastball_player.getPublished()+"'";
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_playercon esa condicion");
       esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return null;
   }
   rs.beforeFirst();
   while (rs.next()) {
   
        Jos_fastball_player jos_fastball_player2 = new Jos_fastball_player(
         rs.getInt("id"),rs.getInt("active"),rs.getInt("playerid"),rs.getInt("teamid"),rs.getString("fname"),rs.getString("mname"),rs.getString("lname"),rs.getString("position1"),rs.getString("position2"),rs.getString("position3"),rs.getString("jerseyhome"),rs.getString("jerseyaway"),rs.getString("bats"),rs.getString("tirar"),rs.getDate("birthdate"),rs.getInt("heightfeet"),rs.getInt("heightinches"),rs.getInt("weight"),rs.getString("weightuom"),rs.getString("hometown"),rs.getString("photo"),rs.getString("cphone"),rs.getString("cmobile"),rs.getString("email"),rs.getString("experience"),rs.getBoolean("checked_out"),rs.getTime("checked_out_time"),rs.getBoolean("published"),rs.getString("player_custom_field1_value"),rs.getString("player_custom_field2_value"));
            
            
       list.add(jos_fastball_player2);
    }
    rs.close();
    psquery.close();
    con.close();
    return list;
} catch (Exception ex) {
      excepcion = ex;
}
  return null;
}


/**
*
* findByPlayer_custom_field1_value()
*/

public static List<Jos_fastball_player> findByPlayer_custom_field1_value(Jos_fastball_player jos_fastball_player) {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return null;
      }
      List<Jos_fastball_player> list = new ArrayList<>();
      String sql = "select * from jos_fastball_player where player_custom_field1_value='"+jos_fastball_player.getPlayer_custom_field1_value()+"'";
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_playercon esa condicion");
       esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return null;
   }
   rs.beforeFirst();
   while (rs.next()) {
   
        Jos_fastball_player jos_fastball_player2 = new Jos_fastball_player(
         rs.getInt("id"),rs.getInt("active"),rs.getInt("playerid"),rs.getInt("teamid"),rs.getString("fname"),rs.getString("mname"),rs.getString("lname"),rs.getString("position1"),rs.getString("position2"),rs.getString("position3"),rs.getString("jerseyhome"),rs.getString("jerseyaway"),rs.getString("bats"),rs.getString("tirar"),rs.getDate("birthdate"),rs.getInt("heightfeet"),rs.getInt("heightinches"),rs.getInt("weight"),rs.getString("weightuom"),rs.getString("hometown"),rs.getString("photo"),rs.getString("cphone"),rs.getString("cmobile"),rs.getString("email"),rs.getString("experience"),rs.getBoolean("checked_out"),rs.getTime("checked_out_time"),rs.getBoolean("published"),rs.getString("player_custom_field1_value"),rs.getString("player_custom_field2_value"));
            
            
       list.add(jos_fastball_player2);
    }
    rs.close();
    psquery.close();
    con.close();
    return list;
} catch (Exception ex) {
      excepcion = ex;
}
  return null;
}


/**
*
* findByPlayer_custom_field2_value()
*/

public static List<Jos_fastball_player> findByPlayer_custom_field2_value(Jos_fastball_player jos_fastball_player) {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return null;
      }
      List<Jos_fastball_player> list = new ArrayList<>();
      String sql = "select * from jos_fastball_player where player_custom_field2_value='"+jos_fastball_player.getPlayer_custom_field2_value()+"'";
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_playercon esa condicion");
       esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return null;
   }
   rs.beforeFirst();
   while (rs.next()) {
   
        Jos_fastball_player jos_fastball_player2 = new Jos_fastball_player(
         rs.getInt("id"),rs.getInt("active"),rs.getInt("playerid"),rs.getInt("teamid"),rs.getString("fname"),rs.getString("mname"),rs.getString("lname"),rs.getString("position1"),rs.getString("position2"),rs.getString("position3"),rs.getString("jerseyhome"),rs.getString("jerseyaway"),rs.getString("bats"),rs.getString("tirar"),rs.getDate("birthdate"),rs.getInt("heightfeet"),rs.getInt("heightinches"),rs.getInt("weight"),rs.getString("weightuom"),rs.getString("hometown"),rs.getString("photo"),rs.getString("cphone"),rs.getString("cmobile"),rs.getString("email"),rs.getString("experience"),rs.getBoolean("checked_out"),rs.getTime("checked_out_time"),rs.getBoolean("published"),rs.getString("player_custom_field1_value"),rs.getString("player_custom_field2_value"));
            
            
       list.add(jos_fastball_player2);
    }
    rs.close();
    psquery.close();
    con.close();
    return list;
} catch (Exception ex) {
      excepcion = ex;
}
  return null;
}


/**
*
* findByMapa()
*/

public static List<Jos_fastball_player> findByMapa(Map parametros) {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return null;
      }
  List<Jos_fastball_player> list = new ArrayList<>();
  String sql = "select * from jos_fastball_player";
  if (parametros != null) {
      Iterator it = parametros.entrySet().iterator();
      StringBuilder sb = new StringBuilder("");
      int i = 0;
      while (it.hasNext()) {
          if (i != 0){
            sb.append(" and ");
         }
         i++;
        Map.Entry e = (Map.Entry) it.next();
        sb.append(e.getKey() +"= '"+  e.getValue()+"'");
      }
      if (!sb.toString().equals("")){
         sql = sql + " where " + sb.toString();
      }
   }
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_player con esa condición");
      esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return null;
   }
   rs.beforeFirst();
   while (rs.next()) {
   
        Jos_fastball_player jos_fastball_player2 = new Jos_fastball_player(
         rs.getInt("id"),rs.getInt("active"),rs.getInt("playerid"),rs.getInt("teamid"),rs.getString("fname"),rs.getString("mname"),rs.getString("lname"),rs.getString("position1"),rs.getString("position2"),rs.getString("position3"),rs.getString("jerseyhome"),rs.getString("jerseyaway"),rs.getString("bats"),rs.getString("tirar"),rs.getDate("birthdate"),rs.getInt("heightfeet"),rs.getInt("heightinches"),rs.getInt("weight"),rs.getString("weightuom"),rs.getString("hometown"),rs.getString("photo"),rs.getString("cphone"),rs.getString("cmobile"),rs.getString("email"),rs.getString("experience"),rs.getBoolean("checked_out"),rs.getTime("checked_out_time"),rs.getBoolean("published"),rs.getString("player_custom_field1_value"),rs.getString("player_custom_field2_value"));
            
            
       list.add(jos_fastball_player2);
    }
    rs.close();
    psquery.close();
    con.close();
    return list;
} catch (Exception ex) {
      excepcion = ex;
}
  return null;
}


/**
*
* Double Func(String funcion, String campo)
*/



public static Double Func(String funcion, String campo) {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return 0.0;
      }
      String sql = "select "+funcion+"("+campo+") as contador from jos_fastball_player";
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_player ");
       esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return 0.0;
   }
    Double tmp =0.0;
   rs.beforeFirst();
   while (rs.next()) {
    tmp =  rs.getDouble("contador");
    }
    rs.close();
    psquery.close();
    con.close();
 return tmp;
} catch (Exception ex) {
      excepcion = ex;
}
  return 0.0;
}


/**
*
* Double Func(String funcion, String campo,String where)
*/



public static Double Func(String funcion, String campo, String where) {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return 0.0;
      }
      String sql = "select "+funcion+"("+campo+") as contador from jos_fastball_player where "+where +" ";
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_player ");
       esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return 0.0;
   }
    Double tmp =0.0;
   rs.beforeFirst();
   while (rs.next()) {
    tmp =  rs.getDouble("contador");
    }
    rs.close();
    psquery.close();
    con.close();
 return tmp;
} catch (Exception ex) {
      excepcion = ex;
}
  return 0.0;
}


/**
*
* Contador()
*/



public static Integer Contador() {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return 0;
      }
      String sql = "select count(*) as contador from jos_fastball_player";
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_player ");
       esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return 0;
   }
   rs.beforeFirst();
   while (rs.next()) {
    x =  rs.getInt("contador");
    }
    rs.close();
    psquery.close();
    con.close();
 return x;
} catch (Exception ex) {
      excepcion = ex;
}
  return 0;
}


/**
*
* Contador(String sqlquery)
*/



public static Integer Contador(String sqlquery) {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return 0;
      }
      String sql = "select count(*) as contador from jos_fastball_player where  " + sqlquery +"";
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_player ");
       esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return 0;
   }
   rs.beforeFirst();
   while (rs.next()) {
    x =  rs.getInt("contador");
    }
    rs.close();
    psquery.close();
    con.close();
 return x;
} catch (Exception ex) {
      excepcion = ex;
}
  return 0;
}


/**
*
* Query()
*/

public static List<Jos_fastball_player> Query(String query) {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return null;
      }
  List<Jos_fastball_player> list = new ArrayList<>();
  String sql = "select * from jos_fastball_player where " + query +"";
  if (query == null || query.equals("")) {
  return null;
   }
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_player con esa condición");
      esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return null;
   }
   rs.beforeFirst();
   while (rs.next()) {
   
        Jos_fastball_player jos_fastball_player2 = new Jos_fastball_player(
         rs.getInt("id"),rs.getInt("active"),rs.getInt("playerid"),rs.getInt("teamid"),rs.getString("fname"),rs.getString("mname"),rs.getString("lname"),rs.getString("position1"),rs.getString("position2"),rs.getString("position3"),rs.getString("jerseyhome"),rs.getString("jerseyaway"),rs.getString("bats"),rs.getString("tirar"),rs.getDate("birthdate"),rs.getInt("heightfeet"),rs.getInt("heightinches"),rs.getInt("weight"),rs.getString("weightuom"),rs.getString("hometown"),rs.getString("photo"),rs.getString("cphone"),rs.getString("cmobile"),rs.getString("email"),rs.getString("experience"),rs.getBoolean("checked_out"),rs.getTime("checked_out_time"),rs.getBoolean("published"),rs.getString("player_custom_field1_value"),rs.getString("player_custom_field2_value"));
            
            
       list.add(jos_fastball_player2);
    }
    rs.close();
    psquery.close();
    con.close();
    return list;
} catch (Exception ex) {
      excepcion = ex;
}
  return null;
}


/**
*
* Listar()
*/

public static List<Jos_fastball_player> getLista(Map parametros) {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return null;
      }
  List<Jos_fastball_player> list = new ArrayList<>();
  String sql = "select * from jos_fastball_player";
  if (parametros != null) {
      Iterator it = parametros.entrySet().iterator();
      StringBuilder sb = new StringBuilder("");
      while (it.hasNext()) {
        Map.Entry e = (Map.Entry) it.next();
        sb.append(e.getKey() +"="+  e.getValue());
      }
      if (!sb.toString().equals("")){
         sql = sql + " where " + sb.toString();
      }
   }
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_player");
       esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return null;
   }
   rs.beforeFirst();
   while (rs.next()) {
       
        Jos_fastball_player jos_fastball_player2 = new Jos_fastball_player(
         rs.getInt("id"),rs.getInt("active"),rs.getInt("playerid"),rs.getInt("teamid"),rs.getString("fname"),rs.getString("mname"),rs.getString("lname"),rs.getString("position1"),rs.getString("position2"),rs.getString("position3"),rs.getString("jerseyhome"),rs.getString("jerseyaway"),rs.getString("bats"),rs.getString("tirar"),rs.getDate("birthdate"),rs.getInt("heightfeet"),rs.getInt("heightinches"),rs.getInt("weight"),rs.getString("weightuom"),rs.getString("hometown"),rs.getString("photo"),rs.getString("cphone"),rs.getString("cmobile"),rs.getString("email"),rs.getString("experience"),rs.getBoolean("checked_out"),rs.getTime("checked_out_time"),rs.getBoolean("published"),rs.getString("player_custom_field1_value"),rs.getString("player_custom_field2_value"));
            
            
       list.add(jos_fastball_player2);
    }
    rs.close();
    psquery.close();
    con.close();
    return list;
} catch (Exception ex) {
      excepcion = ex;
}
  return null;
 }


/**
*
* Conectar()
*/



public static boolean Conectar() {
try {
 Sesion sesion = new Sesion();
  con = sesion.Conectar();
  if (con == null){
      return false;
   }
  return true;
  } catch (Exception ex) {
Mensajeria.MensajeError(ex, "Conectar()");
 }
    return false;
 }


}
